//
//  JDOrderListModel.swift
//  DragonWallet
//
//  Created by volantPig on 2024/8/19.
//

import UIKit
import HandyJSON

class JDOrderListModel: HandyJSON {

    var shopId: String?
    var orderId: String?
    var orderNo: String?
    var totalAmount: String?
    var shopName: String?
    /// 1:境外预售 2:跨境直邮 3:发布订单
    /// 1.跨境直邮 2.跨境预售 3.龙看板4.龙商圈5.用户提现
    var orderSaleType: String?
//    BUYER_PENDING_PAYMENT(1, "买家待付款"),
//        UNPAID_AUTO_CANCEL(2, "未付款自动取消"),
//        PAID_PENDING_ORDER(3, "已付款（待接单）"),
//        BUYER_MANUAL_CANCEL(4, "买家手动取消"),
//        MERCHANT_ACCEPTED_ORDER(5, "商家已接单"),
//        MERCHANT_REJECTED_ORDER(6, "商家已拒单"),
//        MERCHANT_SHIPPED(7, "商家已发货"),
//        LOGISTICS_ARRIVED(8, "物流已到货"),
//        BUYER_CONFIRM_RECEIPT(9, "买家确认收货"),
//        GOODS_PURCHASED(10, "商品已采购"),
    var orderStatus: Int?
    var goodsList: [JDOrderListGoodsModel]?
    var payTime: String?
    
//    {
//        "shopId":1,
//        "orderId":5,
//        "orderNo":"JDCB1723969647161",
//        "totalAmount":1350000,
//        "shopName":"三生有幸茶艺工艺",
//        "orderSaleType":2,
//        "orderStatus":1,
//        "goodsList":
//        [{"goodsPrice":150000,"saleType":2,"count":9,"brand":"上下一白","orderId":5,"goodsName":"黑眼镜","goodsSpec":"1","goodsImgUrl":"https:\\/\\/img11.360buyimg.com\\/n1\\/s450x450_jfs\\/t1\\/54403\\/16\\/24313\\/48223\\/669b4cd9F1f1e51e2\\/91cdf0091dec0c68.jpg","origin":"日本","goodsId":1,"shopId":1,"shopName":"三生有幸茶艺工艺"}
//        ]}
    required init() { }
    
}

class JDOrderListGoodsModel: HandyJSON {
    
    var goodsPrice: String?
    var saleType: String?
    var count: Int?
    var brand: String?
    var orderId: String?
    var goodsName: String?
    var goodsSpec: String?
    var goodsImgUrl: String?
    var origin: String?
    var goodsId: String?
    var shopId: String?
    var shopName: String?
    var specificationName: String?
    
//    {
//        "goodsPrice":150000,
//        "saleType":2,
//        "count":9,
//        "brand":"上下一白",
//        "orderId":5,
//        "goodsName":"黑眼镜",
//        "goodsSpec":"1",
//        "goodsImgUrl":"https:\\/\\/img11.360buyimg.com\\/n1\\/s450x450_jfs\\/t1\\/54403\\/16\\/24313\\/48223\\/669b4cd9F1f1e51e2\\/91cdf0091dec0c68.jpg",
//        "origin":"日本",
//        "goodsId":1,
//        "shopId":1,
//        "shopName":"三生有幸茶艺工艺"
//    }

    required init() { }
}






//"{"msg":"ok","data":{"records":[
//{"shopId":1,"orderId":5,"orderNo":"JDCB1723969647161","totalAmount":1350000,"shopName":"三生有幸茶艺工艺","orderSaleType":2,"orderStatus":1,"goodsList":[{"goodsPrice":150000,"saleType":2,"count":9,"brand":"上下一白","orderId":5,"goodsName":"黑眼镜","goodsSpec":"1","goodsImgUrl":"https:\\/\\/img11.360buyimg.com\\/n1\\/s450x450_jfs\\/t1\\/54403\\/16\\/24313\\/48223\\/669b4cd9F1f1e51e2\\/91cdf0091dec0c68.jpg","origin":"日本","goodsId":1,"shopId":1,"shopName":"三生有幸茶艺工艺"}]}
//],"pageNumber":1,"totalRow":6,"pageSize":10,"totalPage":1},"code":0}"
